
<div class="col-md-12" id="index-page">
    <h3 align="center">List of packages</h3>
    <div>
        <uib-accordion close-others="true">
            <uib-accordion-group ng-repeat="pkg in packages | filter:$root.search:'name'" is-open="pkg.open">
                <uib-accordion-heading >
                    <div class="row">
                        <div class="col-sm-12">
                            <span ng-bind="pkg.name" title="name"></span>

                            <div class="label label-info" ng-if="pkg.owner" ng-bind="pkg.owner.name"></div>
                            <div class="label label-default" ng-if="pkg.is_proxy">proxy</div>

                            <button class="btn btn-sm btn-danger pull-right" ng-click="pkg.remove()">Remove</button>
                            <div class="clearfix"></div>
                        </div>
                    </div>

                </uib-accordion-heading>

                <div class="row">
                    <div class="btn-group col-sm-3 col-md-3 col-lg-2" uib-dropdown ng-repeat="version in pkg.info.versions track by $index">
                        <button id="split-button" type="button" class="btn btn-default" ng-bind="version.name"></button>
                        <button type="button" class="btn btn-default" uib-dropdown-toggle>
                            <span class="caret"></span>
                            <span class="sr-only">Split button!</span>
                        </button>
                        <ul class="uib-dropdown-menu" role="menu" aria-labelledby="split-button">
                            <li role="menuitem">
                                <a ng-click="version.remove()">Remove</a>
                            </li>
                            <li role="menuitem">
                                <a ng-click="version.hide()">Hide</a>
                            </li>
                        </ul>
                    </div>
                </div>
            </uib-accordion-group>
        </uib-accordion>
    </div>
</div>